<style>
    body {
        height: 100vh;
        display: flex;
        justify-content:center;
        align-items:center;
        background-color:#000;
    }
    @keyframes animate {
         0%{
             background-position: 0 0;
         }
         100%{
             background-position: 400% 0;
         }
     }
    a{
        position:relative;
        display:inline-block;
        width: 200px;
        height:60px;
        color: #fff;
        line-height: 60px;
        text-align: center;
        text-decoration:none;
        background: linear-gradient(90deg, #03a9f4,#f441a5,#ffeb3b, #03a9f4);
        background-size: 400%;
        border-radius: 10px;
        animation: animate 8s linear infinite; /*  加入动画  */

    }
    /*        鼠标移入时放动画
    a:hover{
        animation: animate 8s linear infinite;
    }
    */
    a:before{  /*  准备阴影  */
        content:'';
        position: absolute;
        left: -5px;
        top:-5px;
        right:-5px;
        bottom:-5px;
        z-index:-1;
        background:linear-gradient(90deg,
        #03a9f4,
        #f441a5,
        #ffeb3b,
        #03a9f4
        );

        background-size: 400%;
        border-radius: 10px;
        opacity: 0;
        transition: all 1s;
    }
    a:hover:before{  /* 添加光影效果 */
        filter: blur(20px);
        opacity: 1;
    }

</style>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<a href="#">Button</a>
</body>
</html>
